@extends('admin::layouts.admin')
@section("main-content")
    <div class="row">
        <div class="col-xs-12">
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#tab_1" data-toggle="tab" aria-expanded="true">
                            {{ trans('基本配置') }}
                        </a>
                    </li>
                    <li class="">
                        <a href="#tab_2" data-toggle="tab" aria-expanded="false">
                            {{ trans('登录配置') }}
                        </a>
                    </li>
                    <li class="pull-right">
                        <a href="#" class="text-muted">
                            {{ trans('配置信息') }} <i class="fa fa-gear"></i>
                        </a>
                    </li>
                </ul>
                <div class="tab-content" style="padding: 20px">
                    <div class="tab-pane active" id="tab_1">
                        <form
                            class="form-horizontal"
                            action="{{ admin_url('configs/update?name=system') }}"
                            method="post"
                            data-ajax="true"
                            data-no-reset="true"
                        >
                            <div class="form-group">
                                <label for="name" class="col-sm-3 control-label">
                                    网站名称
                                    <span style="color:red">*</span>
                                </label>
                                <div class="col-sm-6">
                                    <input
                                        type="text"
                                        name="web_name"
                                        class="form-control"
                                        id="name"
                                        placeholder="请输入名称"
                                        value="{{ \Illuminate\Support\Arr::get($config, 'system.web_name') }}"
                                    />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="icp">
                                    ICP备
                                </label>
                                <div class="col-sm-6">
                                    <input
                                        type="text"
                                        name="icp"
                                        id="icp"
                                        class="form-control"
                                        placeholder="请输入ICP备"
                                        value="{{ \Illuminate\Support\Arr::get($config, 'system.icp') }}"
                                    />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="public_security_icp">
                                    公网安备
                                </label>
                                <div class="col-sm-6">
                                    <input
                                        type="text"
                                        name="public_security_icp"
                                        id="public_security_icp"
                                        class="form-control"
                                        placeholder="请输入公网安备"
                                        value="{{ \Illuminate\Support\Arr::get($config, 'system.public_security_icp') }}"
                                    />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    统计代码
                                </label>
                                <div class="col-sm-6">
                                    <textarea
                                        name="statistics_code"
                                        class="form-control"
                                        rows="6"
                                    >{{ \Illuminate\Support\Arr::get($config, 'system.statistics_code') }}</textarea>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label"></label>
                                <div class="col-sm-6">
                                    <button type="submit" class="btn btn-info">
                                        {{ trans('修改') }}
                                    </button>
                                </div>
                            </div>

                        </form>
                    </div>
                    <div class="tab-pane" id="tab_2">
                        <form
                            class="form-horizontal"
                            action="{{ admin_url('configs/update?name=login') }}"
                            method="post"
                            data-ajax="true"
                            data-no-reset="true"
                        >
                            {{ csrf_field() }}
                            <div class="form-group">
                                <label class="col-sm-3 control-label">公钥</label>
                                <div class="col-sm-6">
                                    <div class="input-hide">
                                <textarea
                                    class="form-control"
                                    name="public_key"
                                    cols="30"
                                    rows="10">{{ \Illuminate\Support\Arr::get($config, 'login.public_key') }}</textarea>
                                        <div class="tip-block">已隐藏内容，点击查看或编辑</div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">私钥 <span
                                        style="color: red">* 请勿将私钥信息泄露</span></label>

                                <div class="col-sm-6">
                                    <div class="input-hide">
                                <textarea class="form-control" name="private_key" cols="30"
                                          rows="10">{{ \Illuminate\Support\Arr::get($config, 'login.private_key') }}</textarea>
                                        <div class="tip-block">已隐藏内容，点击查看或编辑</div>
                                    </div>
                                    <span class="help-block" style="color: red">请勿将私钥信息泄露</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"></label>
                                <div class="col-sm-6">
                                    <button type="submit" class="btn btn-info">
                                        {{ trans('修改') }}
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
